home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2006 April / DPPRO0406DVD.ISO / Essentials / Programming / Eclipse SDK / eclipse-SDK-3.1.1-win32.exe / eclipse / plugins / org.eclipse.help.webapp_3.1.0 / advanced / confirm.jsp < prev    next >
Encoding:
Text File  |  2005-09-29  |  3.8 KB  |  151 lines

  1. <%--
  2.  Copyright (c) 2000, 2004 IBM Corporation and others.
  3.  All rights reserved. This program and the accompanying materials 
  4.  are made available under the terms of the Eclipse Public License v1.0
  5.  which accompanies this distribution, and is available at
  6.  http://www.eclipse.org/legal/epl-v10.html
  7.  
  8.  Contributors:
  9.      IBM Corporation - initial API and implementation
  10. --%>
  11. <%@ include file="header.jsp"%>
  12.  
  13. <% 
  14.     RequestData data = new RequestData(application, request, response);
  15.     WebappPreferences prefs = data.getPrefs();
  16.     String okText="";
  17.     String cancelText="";
  18.     if("yesno".equalsIgnoreCase(request.getParameter("buttons"))){
  19.         okText=ServletResources.getString("yes", request);
  20.         cancelText=ServletResources.getString("no", request);
  21.     }else{
  22.         okText=ServletResources.getString("OK", request);
  23.         cancelText=ServletResources.getString("Cancel", request);
  24.     }
  25. %>
  26.  
  27.  
  28. <html>
  29. <head>
  30. <title><%=ServletResources.getString(request.getParameter("title"), request)%></title>
  31. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  32. <meta http-equiv="Pragma" content="no-cache">
  33. <meta http-equiv="Expires" content="-1">
  34.  
  35.  
  36. <style type="text/css">
  37. <%@ include file="list.css"%>
  38. </style>
  39.  
  40. <style type="text/css">
  41. HTML, BODY {
  42.     width:100%;
  43.     height:100%;
  44.     margin:0px;
  45.     padding:0px;
  46.     border:0px;
  47. }
  48.  
  49. BODY {
  50.     background-color: <%=prefs.getToolbarBackground()%>;
  51. }
  52.  
  53. TABLE {
  54.     width:auto;
  55. }
  56.  
  57. TD, TR{
  58.     margin:0px;
  59.     padding:0px;
  60.     border:0px;
  61. }
  62.  
  63. BUTTON {
  64.     font:<%=prefs.getViewFont()%>;
  65. }
  66.  
  67. </style>
  68.  
  69. <script language="JavaScript">
  70.  
  71. function onloadHandler() {
  72. <%
  73. if(!data.isMozilla() || "1.3".compareTo(data.getMozillaVersion()) <=0){
  74. // buttons are not resized immediately on mozilla before 1.3
  75. %>
  76.     sizeButtons();
  77. <%}%>
  78.     document.getElementById("<%=request.getParameter("initialFocus")%>").focus();
  79. }
  80.  
  81. function sizeButtons() {
  82.     var minWidth=60;
  83.  
  84.     if(document.getElementById("ok").offsetWidth < minWidth){
  85.         document.getElementById("ok").style.width = minWidth+"px";
  86.     }
  87.     if(document.getElementById("cancel").offsetWidth < minWidth){
  88.         document.getElementById("cancel").style.width = minWidth+"px";
  89.     }
  90. }
  91.  
  92. function confirmed(){
  93.     try{
  94. <% if ("true".equalsIgnoreCase(request.getParameter("dontaskagain")) ){ %>
  95.         if(document.getElementById("dontask").checked){
  96.             window.opener.<%=request.getParameter("dontaskagainCallback")%>;
  97.         }
  98. <% } %>
  99.         window.opener.<%=request.getParameter("confirmCallback")%>;
  100.     } catch(e) {}
  101.      window.close();
  102.     return false;
  103. }
  104.  
  105. </script>
  106.  
  107. </head>
  108.  
  109. <body dir="<%=direction%>" onload="onloadHandler()">
  110. <form onsubmit="confirmed();return false;">
  111. <div style="overflow:auto;height:220px;width:100%;">
  112.     <div style="padding:10px;">
  113.     <span style="font-weight:bold;"><%=ServletResources.getString(request.getParameter("header"), request)%></span>
  114.     <br><br>
  115.     <%=ServletResources.getConfirmShowAllExplanation(request)%>
  116.     </div>
  117. </div>
  118. <% if ("true".equalsIgnoreCase(request.getParameter("dontaskagain")) ){ %>
  119. <div style="height:30px;">
  120.     <div style="padding-left:10px;padding-right:10px;">
  121.     <input class='check'
  122.             type="checkbox" 
  123.             id='dontask' 
  124.             name='dontask'>
  125.             <label for="dontask"
  126.                 accesskey="<%=ServletResources.getAccessKey("dontask", request)%>">
  127.                 <%=ServletResources.getLabel("dontask", request)%>
  128.             </label>
  129.     </div>                
  130. </div>
  131. <% } %>
  132. <div style="height:50px;">
  133.     <table valign="bottom" align="<%=isRTL?"left":"right"%>" style="background:<%=prefs.getToolbarBackground()%>">
  134.         <tr id="buttonsTable" valign="bottom"><td valign="bottom" align="<%=isRTL?"left":"right"%>">
  135.               <table cellspacing=10 cellpading=0 border=0 style="background:transparent;">
  136.                 <tr>
  137.                     <td>
  138.                         <button type="submit" id="ok"><%=okText%></button>
  139.                     </td>
  140.                     <td>
  141.                           <button type="reset" onclick="window.close()" id="cancel"><%=cancelText%></button>
  142.                     </td>
  143.                 </tr>
  144.               </table>
  145.         </td></tr>
  146.     </table>
  147. </div>
  148. </form>
  149. </body>
  150. </html>
  151.